package org.jeecg.modules.demo3.fly.service;

import org.jeecg.modules.demo3.fly.entity.AxhkLandManagement;
import org.jeecg.modules.demo3.fly.entity.AxhkWorkManagement;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.demo3.fly.entity.assist.AxhkLandManagements;
import org.jeecg.modules.demo3.fly.entity.assist.WorkFinish;
import org.jeecg.modules.demo3.fly.entity.assist.qun.AxhkWorkManagements;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.ArrayList;
import java.util.List;

/**
 * @Description: 作业管理
 * @Author: jeecg-boot
 * @Date:   2021-01-28
 * @Version: V1.0
 */
public interface IAxhkWorkManagementService extends IService<AxhkWorkManagement> {

    //添加地块管理-wjn
    String addLands(@RequestParam(value = "axhkLandManagement", required = false) AxhkLandManagement axhkLandManagement);

    //读取文件获得三坐标-wjn
    AxhkLandManagement getLatitude(String filePath) throws Exception;

    //通过 地块名称查询 文件路劲 用于点击获取坐标
    ArrayList<ArrayList> getByPathName(String massifname);

    //通过群id查询该群下所有任务返还给APP
    ArrayList<AxhkLandManagement> getByWorkId(String fluckId);

    //通过手机APP添加任务-wjn
    int addWork(@RequestParam(value = "axhkWorkManagement",required = false) AxhkWorkManagement axhkWorkManagement);

    //根据群id获取到 该群所有任务信息-地块信息  返回给手机APP
    ArrayList<List> getByWorkAndLand(String fluckId);

    //根据 地块id 删除地块信息 和 本地文件
    String getByUpdateLandMang(@RequestParam(value = "axhkLandManagement", required = false)AxhkLandManagement axhkLandManagement);

    //根据地块 id 删除地块信息 以及 本地地块坐标文件
    int getByDeleteLandMang(String id);

    // 通过客户端传递的经纬度 计算现有 地块的位置
    ArrayList<AxhkLandManagement> getByScope(String fluckId,double endLat,double endLng);

    /*
    *修改 任务完成的 标识
    * String workId 任务id
    * String createBy 用户名 修改人
    * */
    String getUpdateFinih(String createBy,String workId);

    /*
     * 查看该用户下所有任务的完成信息
     * 查看该群下所有任务的完成信息
     * String createBy
     * String fluckId
     * int finish
     * */
    WorkFinish AllFinishWork(String createBy,String fluckId);

}
